package tgc.edu.fhh.repository;



import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.fhh.custom.BaseRepository;
import tgc.edu.fhh.entity.Course;
@Repository
public interface CourseRepository extends BaseRepository<Course, Integer>{

	@Query(value = "select distinct course from Grade g where g.student.tbclass.id=?1 and g.course.id=?2")
	public List<Course> findByTbClassIdAndCourseId(Integer bjId, Integer couId);

	@Query(value = "select distinct course from Grade g where g.student.tbclass.id=?1")
	public List<Course> findByTbClassId(Integer bjId);

}
